# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-crccheck
_pkgname=crccheck
_pyver=3.13
pkgver=1.3.1
pkgrel=1
pkgdesc='Classes to calculate CRCs and checksums from binary data.'
arch=('any')
url='https://pypi.org/project/crccheck/#files'
license=('GPL3')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('731733118c6eff154eaf8dee5fc25a5c443ec690ad6d08532a77c73bc0831ac823ab441dec30242ec6043ef2d1368ea631928743947526d39dbc17f07a501283')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm -rf "$pkgdir/usr/lib/python$_pyver/site-packages/tests/"
}

